interface  ShowMessage {
   void ÏÔÊ¾ÉÌ±ê(String s);
}
class TV implements ShowMessage {
   public void ÏÔÊ¾ÉÌ±ê(String s) {
      System.out.println(s);
   }
}
class PC implements ShowMessage {
   public void ÏÔÊ¾ÉÌ±ê(String s) { 
     System.out.println(s);
   }
}
public class Example6_2 {
   public static void main(String args[]) {
      ShowMessage sm;                  //ÉùÃ÷½Ó¿Ú±äÁ¿
      sm=new TV();                     //½Ó¿Ú±äÁ¿ÖÐ´æ·Å¶ÔÏóµÄÒýÓÃ
      sm.ÏÔÊ¾ÉÌ±ê("³¤³ÇÅÆµçÊÓ»ú");      //½Ó¿Ú»Øµ÷¡£
      sm=new PC();                     //½Ó¿Ú±äÁ¿ÖÐ´æ·Å¶ÔÏóµÄÒýÓÃ
      sm.ÏÔÊ¾ÉÌ±ê("ÁªÏë±¼ÔÂ5008PC»ú"); //½Ó¿Ú»Øµ÷
   } 
}
